/* This section adds Gleditsch's country codes (3 letter and numeric)
   Added on August 27, 2007 by Rich Nielsen, rnielsen@fas.harvard.edu */

capture gen countrycode_g = "Country Code (Gleditsch)"
replace countrycode_g = "USA" if countryname=="United States of America"
replace countrycode_g = "CAN" if countryname=="Canada"
replace countrycode_g = "BHM" if countryname=="Bahamas"
replace countrycode_g = "CUB" if countryname=="Cuba"
replace countrycode_g = "HAI" if countryname=="Haiti"
replace countrycode_g = "HAI" if countryname=="Haiti"
replace countrycode_g = "DOM" if countryname=="Dominican Republic"
replace countrycode_g = "JAM" if countryname=="Jamaica"
replace countrycode_g = "TRI" if countryname=="Trinidad and Tobago"
replace countrycode_g = "BAR" if countryname=="Barbados"
replace countrycode_g = "MEX" if countryname=="Mexico"
replace countrycode_g = "BLZ" if countryname=="Belize"
replace countrycode_g = "UPC" if countryname=="United Provinces of Central America"
replace countrycode_g = "GUA" if countryname=="Guatemala"
replace countrycode_g = "HON" if countryname=="Honduras"
replace countrycode_g = "SAL" if countryname=="El Salvador"
replace countrycode_g = "NIC" if countryname=="Nicaragua"
replace countrycode_g = "COS" if countryname=="Costa Rica"
replace countrycode_g = "PAN" if countryname=="Panama"
replace countrycode_g = "GCL" if countryname=="Great Colombia"
replace countrycode_g = "COL" if countryname=="Colombia"
replace countrycode_g = "VEN" if countryname=="Venezuela"
replace countrycode_g = "GUY" if countryname=="Guyana"
replace countrycode_g = "SUR" if countryname=="Surinam"
replace countrycode_g = "ECU" if countryname=="Ecuador"
replace countrycode_g = "PER" if countryname=="Peru"
replace countrycode_g = "BRA" if countryname=="Brazil"
replace countrycode_g = "BOL" if countryname=="Bolivia"
replace countrycode_g = "PAR" if countryname=="Paraguay"
replace countrycode_g = "CHL" if countryname=="Chile"
replace countrycode_g = "ARG" if countryname=="Argentina"
replace countrycode_g = "URU" if countryname=="Uruguay"
replace countrycode_g = "UKG" if countryname=="United Kingdom"
replace countrycode_g = "IRE" if countryname=="Ireland"
replace countrycode_g = "NTH" if countryname=="Netherlands"
replace countrycode_g = "BEL" if countryname=="Belgium"
replace countrycode_g = "LUX" if countryname=="Luxembourg"
replace countrycode_g = "FRN" if countryname=="France"
replace countrycode_g = "SWZ" if countryname=="Switzerland"
replace countrycode_g = "SPN" if countryname=="Spain"
replace countrycode_g = "POR" if countryname=="Portugal"
replace countrycode_g = "HAN" if countryname=="Hanover"
replace countrycode_g = "BAV" if countryname=="Bavaria"
replace countrycode_g = "GMY" if countryname=="Germany (Prussia)"
replace countrycode_g = "GFR" if countryname=="German Federal Republic"
replace countrycode_g = "GDR" if countryname=="German Democratic Republic"
replace countrycode_g = "BAD" if countryname=="Baden"
replace countrycode_g = "SAX" if countryname=="Saxony"
replace countrycode_g = "WRT" if countryname=="W�rttemberg"
replace countrycode_g = "HSE" if countryname=="Hesse-Kassel (Electoral)"
replace countrycode_g = "HSD" if countryname=="Hesse-Darmstadt (Ducal)"
replace countrycode_g = "MEC" if countryname=="Mecklenburg-Schwerin"
replace countrycode_g = "POL" if countryname=="Poland"
replace countrycode_g = "AUH" if countryname=="Austria-Hungary"
replace countrycode_g = "AUS" if countryname=="Austria"
replace countrycode_g = "HUN" if countryname=="Hungary"
replace countrycode_g = "CZE" if countryname=="Czechoslovakia"
replace countrycode_g = "CZR" if countryname=="Czech Republic"
replace countrycode_g = "SLO" if countryname=="Slovakia"
replace countrycode_g = "ITA" if countryname=="Italy/Sardinia"
replace countrycode_g = "PAP" if countryname=="Papal States"
replace countrycode_g = "SIC" if countryname=="Two Sicilies"
replace countrycode_g = "MOD" if countryname=="Modena"
replace countrycode_g = "PMA" if countryname=="Parma"
replace countrycode_g = "TUS" if countryname=="Tuscany"
replace countrycode_g = "MLT" if countryname=="Malta"
replace countrycode_g = "ALB" if countryname=="Albania"
replace countrycode_g = "SER" if countryname=="Serbia"
replace countrycode_g = "MNG" if countryname=="Montenegro"
replace countrycode_g = "MNG" if countryname=="Montenegro"
replace countrycode_g = "MAC" if countryname=="Macedonia (Former Yugoslav Republic of)"
replace countrycode_g = "CRO" if countryname=="Croatia"
replace countrycode_g = "YUG" if countryname=="Yugoslavia (Serbia)"
replace countrycode_g = "BOS" if countryname=="Bosnia-Herzegovina"
replace countrycode_g = "SLV" if countryname=="Slovenia"
replace countrycode_g = "GRC" if countryname=="Greece"
replace countrycode_g = "CYP" if countryname=="Cyprus"
replace countrycode_g = "BUL" if countryname=="Bulgaria"
replace countrycode_g = "MLD" if countryname=="Moldova"
replace countrycode_g = "RUM" if countryname=="Rumania"
replace countrycode_g = "RUS" if countryname=="Russia (Soviet Union)"
replace countrycode_g = "EST" if countryname=="Estonia"
replace countrycode_g = "EST" if countryname=="Estonia"
replace countrycode_g = "LAT" if countryname=="Latvia"
replace countrycode_g = "LAT" if countryname=="Latvia"
replace countrycode_g = "LIT" if countryname=="Lithuania"
replace countrycode_g = "LIT" if countryname=="Lithuania"
replace countrycode_g = "UKR" if countryname=="Ukraine"
replace countrycode_g = "BLR" if countryname=="Belarus (Byelorussia)"
replace countrycode_g = "ARM" if countryname=="Armenia"
replace countrycode_g = "GRG" if countryname=="Georgia"
replace countrycode_g = "AZE" if countryname=="Azerbaijan"
replace countrycode_g = "FIN" if countryname=="Finland"
replace countrycode_g = "SWD" if countryname=="Sweden"
replace countrycode_g = "NOR" if countryname=="Norway"
replace countrycode_g = "DEN" if countryname=="Denmark"
replace countrycode_g = "ICE" if countryname=="Iceland"
replace countrycode_g = "CAP" if countryname=="Cape Verde"
replace countrycode_g = "GNB" if countryname=="Guinea-Bissau"
replace countrycode_g = "EQG" if countryname=="Equatorial Guinea"
replace countrycode_g = "GAM" if countryname=="Gambia"
replace countrycode_g = "MLI" if countryname=="Mali"
replace countrycode_g = "SEN" if countryname=="Senegal"
replace countrycode_g = "BEN" if countryname=="Benin"
replace countrycode_g = "MAA" if countryname=="Mauritania"
replace countrycode_g = "NIR" if countryname=="Niger"
replace countrycode_g = "CDI" if countryname=="Cote D'Ivoire"
replace countrycode_g = "GUI" if countryname=="Guinea"
replace countrycode_g = "BFO" if countryname=="Burkina Faso (Upper Volta)"
replace countrycode_g = "LBR" if countryname=="Liberia"
replace countrycode_g = "SIE" if countryname=="Sierra Leone"
replace countrycode_g = "GHA" if countryname=="Ghana"
replace countrycode_g = "TOG" if countryname=="Togo"
replace countrycode_g = "CAO" if countryname=="Cameroon"
replace countrycode_g = "NIG" if countryname=="Nigeria"
replace countrycode_g = "GAB" if countryname=="Gabon"
replace countrycode_g = "CEN" if countryname=="Central African Republic"
replace countrycode_g = "CHA" if countryname=="Chad"
replace countrycode_g = "CON" if countryname=="Congo"
replace countrycode_g = "DRC" if countryname=="Congo, Democratic Republic of (Zaire)"
replace countrycode_g = "UGA" if countryname=="Uganda"
replace countrycode_g = "KEN" if countryname=="Kenya"
replace countrycode_g = "TAZ" if countryname=="Tanzania/Tanganyika"
replace countrycode_g = "ZAN" if countryname=="Zanzibar"
replace countrycode_g = "BUI" if countryname=="Burundi"
replace countrycode_g = "RWA" if countryname=="Rwanda"
replace countrycode_g = "SOM" if countryname=="Somalia"
replace countrycode_g = "DJI" if countryname=="Djibouti"
replace countrycode_g = "ETH" if countryname=="Ethiopia"
replace countrycode_g = "ERI" if countryname=="Eritrea"
replace countrycode_g = "ANG" if countryname=="Angola"
replace countrycode_g = "MZM" if countryname=="Mozambique"
replace countrycode_g = "ZAM" if countryname=="Zambia"
replace countrycode_g = "ZIM" if countryname=="Zimbabwe (Rhodesia)"
replace countrycode_g = "MAW" if countryname=="Malawi"
replace countrycode_g = "SAF" if countryname=="South Africa"
replace countrycode_g = "TRA" if countryname=="Transvaal"
replace countrycode_g = "OFS" if countryname=="Orange Free State"
replace countrycode_g = "NAM" if countryname=="Namibia"
replace countrycode_g = "LES" if countryname=="Lesotho"
replace countrycode_g = "BOT" if countryname=="Botswana"
replace countrycode_g = "SWA" if countryname=="Swaziland"
replace countrycode_g = "MAG" if countryname=="Madagascar (Malagasy)"
replace countrycode_g = "MAG" if countryname=="Madagascar (Malagasy)"
replace countrycode_g = "COM" if countryname=="Comoros"
replace countrycode_g = "MAS" if countryname=="Mauritius"
replace countrycode_g = "MOR" if countryname=="Morocco"
replace countrycode_g = "MOR" if countryname=="Morocco"
replace countrycode_g = "ALG" if countryname=="Algeria"
replace countrycode_g = "ALG" if countryname=="Algeria"
replace countrycode_g = "TUN" if countryname=="Tunisia"
replace countrycode_g = "TUN" if countryname=="Tunisia"
replace countrycode_g = "LIB" if countryname=="Libya"
replace countrycode_g = "LIB" if countryname=="Libya"
replace countrycode_g = "SUD" if countryname=="Sudan"
replace countrycode_g = "IRN" if countryname=="Iran (Persia)"
replace countrycode_g = "TUR" if countryname=="Turkey/Ottoman Empire"
replace countrycode_g = "IRQ" if countryname=="Iraq"
replace countrycode_g = "EGY" if countryname=="Egypt"
replace countrycode_g = "EGY" if countryname=="Egypt"
replace countrycode_g = "SYR" if countryname=="Syria"
replace countrycode_g = "LEB" if countryname=="Lebanon"
replace countrycode_g = "JOR" if countryname=="Jordan"
replace countrycode_g = "ISR" if countryname=="Israel"
replace countrycode_g = "SAU" if countryname=="Saudi Arabia"
replace countrycode_g = "YEM" if countryname=="Yemen (Arab Republic of Yemen)"
replace countrycode_g = "YPR" if countryname=="Yemen, People's Republic of"
replace countrycode_g = "KUW" if countryname=="Kuwait"
replace countrycode_g = "BAH" if countryname=="Bahrain"
replace countrycode_g = "QAT" if countryname=="Qatar"
replace countrycode_g = "UAE" if countryname=="United Arab Emirates"
replace countrycode_g = "OMA" if countryname=="Oman"
replace countrycode_g = "AFG" if countryname=="Afghanistan"
replace countrycode_g = "AFG" if countryname=="Afghanistan"
replace countrycode_g = "TKM" if countryname=="Turkmenistan"
replace countrycode_g = "TAJ" if countryname=="Tajikistan"
replace countrycode_g = "KYR" if countryname=="Kyrgyz Republic"
replace countrycode_g = "UZB" if countryname=="Uzbekistan"
replace countrycode_g = "KZK" if countryname=="Kazakhstan"
replace countrycode_g = "CHN" if countryname=="China"
replace countrycode_g = "TBT" if countryname=="Tibet"
replace countrycode_g = "MON" if countryname=="Mongolia"
replace countrycode_g = "TAW" if countryname=="Taiwan"
replace countrycode_g = "KOR" if countryname=="Korea"
replace countrycode_g = "PRK" if countryname=="Korea, People's Republic of"
replace countrycode_g = "ROK" if countryname=="Korea, Republic of"
replace countrycode_g = "JPN" if countryname=="Japan"
replace countrycode_g = "IND" if countryname=="India"
replace countrycode_g = "BHU" if countryname=="Bhutan"
replace countrycode_g = "PAK" if countryname=="Pakistan"
replace countrycode_g = "BNG" if countryname=="Bangladesh"
replace countrycode_g = "MYA" if countryname=="Myanmar (Burma)"
replace countrycode_g = "MYA" if countryname=="Myanmar (Burma)"
replace countrycode_g = "SRI" if countryname=="Sri Lanka (Ceylon)"
replace countrycode_g = "MAD" if countryname=="Maldives"
replace countrycode_g = "NEP" if countryname=="Nepal"
replace countrycode_g = "THI" if countryname=="Thailand"
replace countrycode_g = "CAM" if countryname=="Cambodia (Kampuchea)"
replace countrycode_g = "LAO" if countryname=="Laos"
replace countrycode_g = "VNM" if countryname=="Vietnam (Annam/Cochin China/Tonkin)"
replace countrycode_g = "DRV" if countryname=="Vietnam, Democratic Republic of"
replace countrycode_g = "RVN" if countryname=="Vietnam, Republic of"
replace countrycode_g = "MAL" if countryname=="Malaysia"
replace countrycode_g = "SIN" if countryname=="Singapore"
replace countrycode_g = "BRU" if countryname=="Brunei"
replace countrycode_g = "PHI" if countryname=="Philippines"
replace countrycode_g = "INS" if countryname=="Indonesia"
replace countrycode_g = "ETM" if countryname=="East Timor"
replace countrycode_g = "AUL" if countryname=="Australia"
replace countrycode_g = "PNG" if countryname=="Papua New Guinea"
replace countrycode_g = "NEW" if countryname=="New Zealand"
replace countrycode_g = "SOL" if countryname=="Solomon Islands"
replace countrycode_g = "FJI" if countryname=="Fiji"
 
/* Gleditsch's numeric country codes */
capture gen countrynumcode_g =.
replace countrynumcode_g =2 if countryname=="United States of America"
replace countrynumcode_g =20 if countryname=="Canada"
replace countrynumcode_g =31 if countryname=="Bahamas"
replace countrynumcode_g =40 if countryname=="Cuba"
replace countrynumcode_g =41 if countryname=="Haiti"
replace countrynumcode_g =41 if countryname=="Haiti"
replace countrynumcode_g =42 if countryname=="Dominican Republic"
replace countrynumcode_g =51 if countryname=="Jamaica"
replace countrynumcode_g =52 if countryname=="Trinidad and Tobago"
replace countrynumcode_g =53 if countryname=="Barbados"
replace countrynumcode_g =70 if countryname=="Mexico"
replace countrynumcode_g =80 if countryname=="Belize"
replace countrynumcode_g =89 if countryname=="United Provinces of Central America"
replace countrynumcode_g =90 if countryname=="Guatemala"
replace countrynumcode_g =91 if countryname=="Honduras"
replace countrynumcode_g =92 if countryname=="El Salvador"
replace countrynumcode_g =93 if countryname=="Nicaragua"
replace countrynumcode_g =94 if countryname=="Costa Rica"
replace countrynumcode_g =95 if countryname=="Panama"
replace countrynumcode_g =99 if countryname=="Great Colombia"
replace countrynumcode_g =100 if countryname=="Colombia"
replace countrynumcode_g =101 if countryname=="Venezuela"
replace countrynumcode_g =110 if countryname=="Guyana"
replace countrynumcode_g =115 if countryname=="Surinam"
replace countrynumcode_g =130 if countryname=="Ecuador"
replace countrynumcode_g =135 if countryname=="Peru"
replace countrynumcode_g =140 if countryname=="Brazil"
replace countrynumcode_g =145 if countryname=="Bolivia"
replace countrynumcode_g =150 if countryname=="Paraguay"
replace countrynumcode_g =155 if countryname=="Chile"
replace countrynumcode_g =160 if countryname=="Argentina"
replace countrynumcode_g =165 if countryname=="Uruguay"
replace countrynumcode_g =200 if countryname=="United Kingdom"
replace countrynumcode_g =205 if countryname=="Ireland"
replace countrynumcode_g =210 if countryname=="Netherlands"
replace countrynumcode_g =211 if countryname=="Belgium"
replace countrynumcode_g =212 if countryname=="Luxembourg"
replace countrynumcode_g =220 if countryname=="France"
replace countrynumcode_g =225 if countryname=="Switzerland"
replace countrynumcode_g =230 if countryname=="Spain"
replace countrynumcode_g =235 if countryname=="Portugal"
replace countrynumcode_g =240 if countryname=="Hanover"
replace countrynumcode_g =245 if countryname=="Bavaria"
replace countrynumcode_g =255 if countryname=="Germany (Prussia)"
replace countrynumcode_g =260 if countryname=="German Federal Republic"
replace countrynumcode_g =265 if countryname=="German Democratic Republic"
replace countrynumcode_g =267 if countryname=="Baden"
replace countrynumcode_g =269 if countryname=="Saxony"
replace countrynumcode_g =271 if countryname=="W�rttemberg"
replace countrynumcode_g =273 if countryname=="Hesse-Kassel (Electoral)"
replace countrynumcode_g =275 if countryname=="Hesse-Darmstadt (Ducal)"
replace countrynumcode_g =280 if countryname=="Mecklenburg-Schwerin"
replace countrynumcode_g =290 if countryname=="Poland"
replace countrynumcode_g =300 if countryname=="Austria-Hungary"
replace countrynumcode_g =305 if countryname=="Austria"
replace countrynumcode_g =310 if countryname=="Hungary"
replace countrynumcode_g =315 if countryname=="Czechoslovakia"
replace countrynumcode_g =316 if countryname=="Czech Republic"
replace countrynumcode_g =317 if countryname=="Slovakia"
replace countrynumcode_g =325 if countryname=="Italy/Sardinia"
replace countrynumcode_g =327 if countryname=="Papal States"
replace countrynumcode_g =329 if countryname=="Two Sicilies"
replace countrynumcode_g =332 if countryname=="Modena"
replace countrynumcode_g =335 if countryname=="Parma"
replace countrynumcode_g =337 if countryname=="Tuscany"
replace countrynumcode_g =338 if countryname=="Malta"
replace countrynumcode_g =339 if countryname=="Albania"
replace countrynumcode_g =340 if countryname=="Serbia"
replace countrynumcode_g =341 if countryname=="Montenegro"
replace countrynumcode_g =341 if countryname=="Montenegro"
replace countrynumcode_g =343 if countryname=="Macedonia (Former Yugoslav Republic of)"
replace countrynumcode_g =344 if countryname=="Croatia"
replace countrynumcode_g =345 if countryname=="Yugoslavia (Serbia)"
replace countrynumcode_g =346 if countryname=="Bosnia-Herzegovina"
replace countrynumcode_g =349 if countryname=="Slovenia"
replace countrynumcode_g =350 if countryname=="Greece"
replace countrynumcode_g =352 if countryname=="Cyprus"
replace countrynumcode_g =355 if countryname=="Bulgaria"
replace countrynumcode_g =359 if countryname=="Moldova"
replace countrynumcode_g =360 if countryname=="Rumania"
replace countrynumcode_g =365 if countryname=="Russia (Soviet Union)"
replace countrynumcode_g =366 if countryname=="Estonia"
replace countrynumcode_g =366 if countryname=="Estonia"
replace countrynumcode_g =367 if countryname=="Latvia"
replace countrynumcode_g =367 if countryname=="Latvia"
replace countrynumcode_g =368 if countryname=="Lithuania"
replace countrynumcode_g =368 if countryname=="Lithuania"
replace countrynumcode_g =369 if countryname=="Ukraine"
replace countrynumcode_g =370 if countryname=="Belarus (Byelorussia)"
replace countrynumcode_g =371 if countryname=="Armenia"
replace countrynumcode_g =372 if countryname=="Georgia"
replace countrynumcode_g =373 if countryname=="Azerbaijan"
replace countrynumcode_g =375 if countryname=="Finland"
replace countrynumcode_g =380 if countryname=="Sweden"
replace countrynumcode_g =385 if countryname=="Norway"
replace countrynumcode_g =390 if countryname=="Denmark"
replace countrynumcode_g =395 if countryname=="Iceland"
replace countrynumcode_g =402 if countryname=="Cape Verde"
replace countrynumcode_g =404 if countryname=="Guinea-Bissau"
replace countrynumcode_g =411 if countryname=="Equatorial Guinea"
replace countrynumcode_g =420 if countryname=="Gambia"
replace countrynumcode_g =432 if countryname=="Mali"
replace countrynumcode_g =433 if countryname=="Senegal"
replace countrynumcode_g =434 if countryname=="Benin"
replace countrynumcode_g =435 if countryname=="Mauritania"
replace countrynumcode_g =436 if countryname=="Niger"
replace countrynumcode_g =437 if countryname=="Cote D'Ivoire"
replace countrynumcode_g =438 if countryname=="Guinea"
replace countrynumcode_g =439 if countryname=="Burkina Faso (Upper Volta)"
replace countrynumcode_g =450 if countryname=="Liberia"
replace countrynumcode_g =451 if countryname=="Sierra Leone"
replace countrynumcode_g =452 if countryname=="Ghana"
replace countrynumcode_g =461 if countryname=="Togo"
replace countrynumcode_g =471 if countryname=="Cameroon"
replace countrynumcode_g =475 if countryname=="Nigeria"
replace countrynumcode_g =481 if countryname=="Gabon"
replace countrynumcode_g =482 if countryname=="Central African Republic"
replace countrynumcode_g =483 if countryname=="Chad"
replace countrynumcode_g =484 if countryname=="Congo"
replace countrynumcode_g =490 if countryname=="Congo, Democratic Republic of (Zaire)"
replace countrynumcode_g =500 if countryname=="Uganda"
replace countrynumcode_g =501 if countryname=="Kenya"
replace countrynumcode_g =510 if countryname=="Tanzania/Tanganyika"
replace countrynumcode_g =511 if countryname=="Zanzibar"
replace countrynumcode_g =516 if countryname=="Burundi"
replace countrynumcode_g =517 if countryname=="Rwanda"
replace countrynumcode_g =520 if countryname=="Somalia"
replace countrynumcode_g =522 if countryname=="Djibouti"
replace countrynumcode_g =530 if countryname=="Ethiopia"
replace countrynumcode_g =531 if countryname=="Eritrea"
replace countrynumcode_g =540 if countryname=="Angola"
replace countrynumcode_g =541 if countryname=="Mozambique"
replace countrynumcode_g =551 if countryname=="Zambia"
replace countrynumcode_g =552 if countryname=="Zimbabwe (Rhodesia)"
replace countrynumcode_g =553 if countryname=="Malawi"
replace countrynumcode_g =560 if countryname=="South Africa"
replace countrynumcode_g =563 if countryname=="Transvaal"
replace countrynumcode_g =564 if countryname=="Orange Free State"
replace countrynumcode_g =565 if countryname=="Namibia"
replace countrynumcode_g =570 if countryname=="Lesotho"
replace countrynumcode_g =571 if countryname=="Botswana"
replace countrynumcode_g =572 if countryname=="Swaziland"
replace countrynumcode_g =580 if countryname=="Madagascar (Malagasy)"
replace countrynumcode_g =580 if countryname=="Madagascar (Malagasy)"
replace countrynumcode_g =581 if countryname=="Comoros"
replace countrynumcode_g =590 if countryname=="Mauritius"
replace countrynumcode_g =600 if countryname=="Morocco"
replace countrynumcode_g =600 if countryname=="Morocco"
replace countrynumcode_g =615 if countryname=="Algeria"
replace countrynumcode_g =615 if countryname=="Algeria"
replace countrynumcode_g =616 if countryname=="Tunisia"
replace countrynumcode_g =616 if countryname=="Tunisia"
replace countrynumcode_g =620 if countryname=="Libya"
replace countrynumcode_g =620 if countryname=="Libya"
replace countrynumcode_g =625 if countryname=="Sudan"
replace countrynumcode_g =630 if countryname=="Iran (Persia)"
replace countrynumcode_g =640 if countryname=="Turkey/Ottoman Empire"
replace countrynumcode_g =645 if countryname=="Iraq"
replace countrynumcode_g =651 if countryname=="Egypt"
replace countrynumcode_g =651 if countryname=="Egypt"
replace countrynumcode_g =652 if countryname=="Syria"
replace countrynumcode_g =660 if countryname=="Lebanon"
replace countrynumcode_g =663 if countryname=="Jordan"
replace countrynumcode_g =666 if countryname=="Israel"
replace countrynumcode_g =670 if countryname=="Saudi Arabia"
replace countrynumcode_g =678 if countryname=="Yemen (Arab Republic of Yemen)"
replace countrynumcode_g =680 if countryname=="Yemen, People's Republic of"
replace countrynumcode_g =690 if countryname=="Kuwait"
replace countrynumcode_g =692 if countryname=="Bahrain"
replace countrynumcode_g =694 if countryname=="Qatar"
replace countrynumcode_g =696 if countryname=="United Arab Emirates"
replace countrynumcode_g =698 if countryname=="Oman"
replace countrynumcode_g =700 if countryname=="Afghanistan"
replace countrynumcode_g =700 if countryname=="Afghanistan"
replace countrynumcode_g =701 if countryname=="Turkmenistan"
replace countrynumcode_g =702 if countryname=="Tajikistan"
replace countrynumcode_g =703 if countryname=="Kyrgyz Republic"
replace countrynumcode_g =704 if countryname=="Uzbekistan"
replace countrynumcode_g =705 if countryname=="Kazakhstan"
replace countrynumcode_g =710 if countryname=="China"
replace countrynumcode_g =711 if countryname=="Tibet"
replace countrynumcode_g =712 if countryname=="Mongolia"
replace countrynumcode_g =713 if countryname=="Taiwan"
replace countrynumcode_g =730 if countryname=="Korea"
replace countrynumcode_g =731 if countryname=="Korea, People's Republic of"
replace countrynumcode_g =732 if countryname=="Korea, Republic of"
replace countrynumcode_g =740 if countryname=="Japan"
replace countrynumcode_g =750 if countryname=="India"
replace countrynumcode_g =760 if countryname=="Bhutan"
replace countrynumcode_g =770 if countryname=="Pakistan"
replace countrynumcode_g =771 if countryname=="Bangladesh"
replace countrynumcode_g =775 if countryname=="Myanmar (Burma)"
replace countrynumcode_g =775 if countryname=="Myanmar (Burma)"
replace countrynumcode_g =780 if countryname=="Sri Lanka (Ceylon)"
replace countrynumcode_g =781 if countryname=="Maldives"
replace countrynumcode_g =790 if countryname=="Nepal"
replace countrynumcode_g =800 if countryname=="Thailand"
replace countrynumcode_g =811 if countryname=="Cambodia (Kampuchea)"
replace countrynumcode_g =812 if countryname=="Laos"
replace countrynumcode_g =815 if countryname=="Vietnam (Annam/Cochin China/Tonkin)"
replace countrynumcode_g =816 if countryname=="Vietnam, Democratic Republic of"
replace countrynumcode_g =817 if countryname=="Vietnam, Republic of"
replace countrynumcode_g =820 if countryname=="Malaysia"
replace countrynumcode_g =830 if countryname=="Singapore"
replace countrynumcode_g =835 if countryname=="Brunei"
replace countrynumcode_g =840 if countryname=="Philippines"
replace countrynumcode_g =850 if countryname=="Indonesia"
replace countrynumcode_g =860 if countryname=="East Timor"
replace countrynumcode_g =900 if countryname=="Australia"
replace countrynumcode_g =910 if countryname=="Papua New Guinea"
replace countrynumcode_g =920 if countryname=="New Zealand"
replace countrynumcode_g =940 if countryname=="Solomon Islands"
replace countrynumcode_g =950 if countryname=="Fiji"


/*  This does creates the same codes for Gleditsch's list of micro-states */
replace countrycode_g = "DMA" if countryname=="Dominica"
replace countrycode_g = "GRN" if countryname=="Grenada"
replace countrycode_g = "SLU" if countryname=="Saint Lucia"
replace countrycode_g = "SVG" if countryname=="Saint Vincent and the Grenadines"
replace countrycode_g = "AAB" if countryname=="Antigua & Barbuda"
replace countrycode_g = "SKN" if countryname=="Saint Kitts and Nevis"
replace countrycode_g = "MNC" if countryname=="Monaco"
replace countrycode_g = "LIE" if countryname=="Liechtenstein"
replace countrycode_g = "SNM" if countryname=="San Marino"
replace countrycode_g = "AND" if countryname=="Andorra"
replace countrycode_g = "STP" if countryname=="Sao Tome and Principe"
replace countrycode_g = "SEY" if countryname=="Seychelles"
replace countrycode_g = "VAN" if countryname=="Vanuatu"
replace countrycode_g = "KBI" if countryname=="Kiribati"
replace countrycode_g = "NAU" if countryname=="Nauru"
replace countrycode_g = "TON" if countryname=="Tonga"
replace countrycode_g = "TUV" if countryname=="Tuvalu"
replace countrycode_g = "MSI" if countryname=="Marshall Islands"
replace countrycode_g = "PAL" if countryname=="Palau"
replace countrycode_g = "FSM" if countryname=="Federated States of Micronesia"
replace countrycode_g = "WSM" if countryname=="Samoa/Western Samoa"

replace countrynumcode_g =54 if countryname=="Dominica"
replace countrynumcode_g =55 if countryname=="Grenada"
replace countrynumcode_g =56 if countryname=="Saint Lucia"
replace countrynumcode_g =57 if countryname=="Saint Vincent and the Grenadines"
replace countrynumcode_g =58 if countryname=="Antigua & Barbuda"
replace countrynumcode_g =60 if countryname=="Saint Kitts and Nevis"
replace countrynumcode_g =221 if countryname=="Monaco"
replace countrynumcode_g =223 if countryname=="Liechtenstein"
replace countrynumcode_g =331 if countryname=="San Marino"
replace countrynumcode_g =232 if countryname=="Andorra"
replace countrynumcode_g =403 if countryname=="Sao Tome and Principe"
replace countrynumcode_g =591 if countryname=="Seychelles"
replace countrynumcode_g =935 if countryname=="Vanuatu"
replace countrynumcode_g =970 if countryname=="Kiribati"
replace countrynumcode_g =971 if countryname=="Nauru"
replace countrynumcode_g =972 if countryname=="Tonga"
replace countrynumcode_g =973 if countryname=="Tuvalu"
replace countrynumcode_g =983 if countryname=="Marshall Islands"
replace countrynumcode_g =986 if countryname=="Palau"
replace countrynumcode_g =987 if countryname=="Federated States of Micronesia"
replace countrynumcode_g =990 if countryname=="Samoa/Western Samoa"



/*	This section will convert things that only have Gleditsch's 
	3-character codes(like his GDP dataset) so that they also 
	have the countrynames. 

	In order to work, this section requires that you run:
	gen countryname_g="proper(countryname)"  */

capture replace countryname_g = "Afghanistan" if countrycode_g=="AFG"
capture replace countryname_g = "Afghanistan" if countrycode_g=="AFG"
capture replace countryname_g = "Albania" if countrycode_g=="ALB"
capture replace countryname_g = "Algeria" if countrycode_g=="ALG"
capture replace countryname_g = "Algeria" if countrycode_g=="ALG"
capture replace countryname_g = "Angola" if countrycode_g=="ANG"
capture replace countryname_g = "Argentina" if countrycode_g=="ARG"
capture replace countryname_g = "Armenia" if countrycode_g=="ARM"
capture replace countryname_g = "Australia" if countrycode_g=="AUL"
capture replace countryname_g = "Austria" if countrycode_g=="AUS"
capture replace countryname_g = "Austria-Hungary" if countrycode_g=="AUH"
capture replace countryname_g = "Azerbaijan" if countrycode_g=="AZE"
capture replace countryname_g = "Baden" if countrycode_g=="BAD"
capture replace countryname_g = "Bahamas" if countrycode_g=="BHM"
capture replace countryname_g = "Bahrain" if countrycode_g=="BAH"
capture replace countryname_g = "Bangladesh" if countrycode_g=="BNG"
capture replace countryname_g = "Barbados" if countrycode_g=="BAR"
capture replace countryname_g = "Bavaria" if countrycode_g=="BAV"
capture replace countryname_g = "Belarus (Byelorussia)" if countrycode_g=="BLR"
capture replace countryname_g = "Belgium" if countrycode_g=="BEL"
capture replace countryname_g = "Belize" if countrycode_g=="BLZ"
capture replace countryname_g = "Benin" if countrycode_g=="BEN"
capture replace countryname_g = "Bhutan" if countrycode_g=="BHU"
capture replace countryname_g = "Bolivia" if countrycode_g=="BOL"
capture replace countryname_g = "Bosnia-Herzegovina" if countrycode_g=="BOS"
capture replace countryname_g = "Botswana" if countrycode_g=="BOT"
capture replace countryname_g = "Brazil" if countrycode_g=="BRA"
capture replace countryname_g = "Brunei" if countrycode_g=="BRU"
capture replace countryname_g = "Bulgaria" if countrycode_g=="BUL"
capture replace countryname_g = "Burkina Faso (Upper Volta)" if countrycode_g=="BFO"
capture replace countryname_g = "Burundi" if countrycode_g=="BUI"
capture replace countryname_g = "Cambodia (Kampuchea)" if countrycode_g=="CAM"
capture replace countryname_g = "Cameroon" if countrycode_g=="CAO"
capture replace countryname_g = "Canada" if countrycode_g=="CAN"
capture replace countryname_g = "Cape Verde" if countrycode_g=="CAP"
capture replace countryname_g = "Central African Republic" if countrycode_g=="CEN"
capture replace countryname_g = "Chad" if countrycode_g=="CHA"
capture replace countryname_g = "Chile" if countrycode_g=="CHL"
capture replace countryname_g = "China" if countrycode_g=="CHN"
capture replace countryname_g = "Colombia" if countrycode_g=="COL"
capture replace countryname_g = "Comoros" if countrycode_g=="COM"
capture replace countryname_g = "Congo" if countrycode_g=="CON"
capture replace countryname_g = "Congo, Democratic Republic of (Zaire)" if countrycode_g=="DRC"
capture replace countryname_g = "Costa Rica" if countrycode_g=="COS"
capture replace countryname_g = "Cote D'Ivoire" if countrycode_g=="CDI"
****This is a departure from Gleditsch where the name is Cote D�Ivoire****

capture replace countryname_g = "Croatia" if countrycode_g=="CRO"
capture replace countryname_g = "Cuba" if countrycode_g=="CUB"
capture replace countryname_g = "Cyprus" if countrycode_g=="CYP"
capture replace countryname_g = "Czech Republic" if countrycode_g=="CZR"
capture replace countryname_g = "Czechoslovakia" if countrycode_g=="CZE"
capture replace countryname_g = "Denmark" if countrycode_g=="DEN"
capture replace countryname_g = "Djibouti" if countrycode_g=="DJI"
capture replace countryname_g = "Dominican Republic" if countrycode_g=="DOM"
capture replace countryname_g = "East Timor" if countrycode_g=="ETM"
capture replace countryname_g = "Ecuador" if countrycode_g=="ECU"
capture replace countryname_g = "Egypt" if countrycode_g=="EGY"
capture replace countryname_g = "Egypt" if countrycode_g=="EGY"
capture replace countryname_g = "El Salvador" if countrycode_g=="SAL"
capture replace countryname_g = "Equatorial Guinea" if countrycode_g=="EQG"
capture replace countryname_g = "Eritrea" if countrycode_g=="ERI"
capture replace countryname_g = "Estonia" if countrycode_g=="EST"
capture replace countryname_g = "Estonia" if countrycode_g=="EST"
capture replace countryname_g = "Ethiopia" if countrycode_g=="ETH"
capture replace countryname_g = "Fiji" if countrycode_g=="FJI"
capture replace countryname_g = "Finland" if countrycode_g=="FIN"
capture replace countryname_g = "France" if countrycode_g=="FRN"
capture replace countryname_g = "Gabon" if countrycode_g=="GAB"
capture replace countryname_g = "Gambia" if countrycode_g=="GAM"
capture replace countryname_g = "Georgia" if countrycode_g=="GRG"
capture replace countryname_g = "German Democratic Republic" if countrycode_g=="GDR"
capture replace countryname_g = "German Federal Republic" if countrycode_g=="GFR"
capture replace countryname_g = "Germany (Prussia)" if countrycode_g=="GMY"
capture replace countryname_g = "Ghana" if countrycode_g=="GHA"
capture replace countryname_g = "Great Colombia" if countrycode_g=="GCL"
capture replace countryname_g = "Greece" if countrycode_g=="GRC"
capture replace countryname_g = "Guatemala" if countrycode_g=="GUA"
capture replace countryname_g = "Guinea" if countrycode_g=="GUI"
capture replace countryname_g = "Guinea-Bissau" if countrycode_g=="GNB"
capture replace countryname_g = "Guyana" if countrycode_g=="GUY"
capture replace countryname_g = "Haiti" if countrycode_g=="HAI"
capture replace countryname_g = "Haiti" if countrycode_g=="HAI"
capture replace countryname_g = "Hanover" if countrycode_g=="HAN"
capture replace countryname_g = "Hesse-Darmstadt (Ducal)" if countrycode_g=="HSD"
capture replace countryname_g = "Hesse-Kassel (Electoral)" if countrycode_g=="HSE"
capture replace countryname_g = "Honduras" if countrycode_g=="HON"
capture replace countryname_g = "Hungary" if countrycode_g=="HUN"
capture replace countryname_g = "Iceland" if countrycode_g=="ICE"
capture replace countryname_g = "India" if countrycode_g=="IND"
capture replace countryname_g = "Indonesia" if countrycode_g=="INS"
capture replace countryname_g = "Iran (Persia)" if countrycode_g=="IRN"
capture replace countryname_g = "Iraq" if countrycode_g=="IRQ"
capture replace countryname_g = "Ireland" if countrycode_g=="IRE"
capture replace countryname_g = "Israel" if countrycode_g=="ISR"
capture replace countryname_g = "Italy/Sardinia" if countrycode_g=="ITA"
capture replace countryname_g = "Jamaica" if countrycode_g=="JAM"
capture replace countryname_g = "Japan" if countrycode_g=="JPN"
capture replace countryname_g = "Jordan" if countrycode_g=="JOR"
capture replace countryname_g = "Kazakhstan" if countrycode_g=="KZK"
capture replace countryname_g = "Kenya" if countrycode_g=="KEN"
capture replace countryname_g = "Korea" if countrycode_g=="KOR"
capture replace countryname_g = "Korea, People's Republic of" if countrycode_g=="PRK"
capture replace countryname_g = "Korea, Republic of" if countrycode_g=="ROK"
capture replace countryname_g = "Kuwait" if countrycode_g=="KUW"
capture replace countryname_g = "Kyrgyz Republic" if countrycode_g=="KYR"
capture replace countryname_g = "Laos" if countrycode_g=="LAO"
capture replace countryname_g = "Latvia" if countrycode_g=="LAT"
capture replace countryname_g = "Latvia" if countrycode_g=="LAT"
capture replace countryname_g = "Lebanon" if countrycode_g=="LEB"
capture replace countryname_g = "Lesotho" if countrycode_g=="LES"
capture replace countryname_g = "Liberia" if countrycode_g=="LBR"
capture replace countryname_g = "Libya" if countrycode_g=="LIB"
capture replace countryname_g = "Libya" if countrycode_g=="LIB"
capture replace countryname_g = "Lithuania" if countrycode_g=="LIT"
capture replace countryname_g = "Lithuania" if countrycode_g=="LIT"
capture replace countryname_g = "Luxembourg" if countrycode_g=="LUX"
capture replace countryname_g = "Macedonia (Former Yugoslav Republic of)" if countrycode_g=="MAC"
capture replace countryname_g = "Madagascar (Malagasy)" if countrycode_g=="MAG"
capture replace countryname_g = "Madagascar (Malagasy)" if countrycode_g=="MAG"
capture replace countryname_g = "Malawi" if countrycode_g=="MAW"
capture replace countryname_g = "Malaysia" if countrycode_g=="MAL"
capture replace countryname_g = "Maldives" if countrycode_g=="MAD"
capture replace countryname_g = "Mali" if countrycode_g=="MLI"
capture replace countryname_g = "Malta" if countrycode_g=="MLT"
capture replace countryname_g = "Mauritania" if countrycode_g=="MAA"
capture replace countryname_g = "Mauritius" if countrycode_g=="MAS"
capture replace countryname_g = "Mecklenburg-Schwerin" if countrycode_g=="MEC"
capture replace countryname_g = "Mexico" if countrycode_g=="MEX"
capture replace countryname_g = "Modena" if countrycode_g=="MOD"
capture replace countryname_g = "Moldova" if countrycode_g=="MLD"
capture replace countryname_g = "Mongolia" if countrycode_g=="MON"
capture replace countryname_g = "Montenegro" if countrycode_g=="MNG"
capture replace countryname_g = "Montenegro" if countrycode_g=="MNG"
capture replace countryname_g = "Morocco" if countrycode_g=="MOR"
capture replace countryname_g = "Morocco" if countrycode_g=="MOR"
capture replace countryname_g = "Mozambique" if countrycode_g=="MZM"
capture replace countryname_g = "Myanmar (Burma)" if countrycode_g=="MYA"
capture replace countryname_g = "Myanmar (Burma)" if countrycode_g=="MYA"
capture replace countryname_g = "Namibia" if countrycode_g=="NAM"
capture replace countryname_g = "Nepal" if countrycode_g=="NEP"
capture replace countryname_g = "Netherlands" if countrycode_g=="NTH"
capture replace countryname_g = "New Zealand" if countrycode_g=="NEW"
capture replace countryname_g = "Nicaragua" if countrycode_g=="NIC"
capture replace countryname_g = "Niger" if countrycode_g=="NIR"
capture replace countryname_g = "Nigeria" if countrycode_g=="NIG"
capture replace countryname_g = "Norway" if countrycode_g=="NOR"
capture replace countryname_g = "Oman" if countrycode_g=="OMA"
capture replace countryname_g = "Orange Free State" if countrycode_g=="OFS"
capture replace countryname_g = "Pakistan" if countrycode_g=="PAK"
capture replace countryname_g = "Panama" if countrycode_g=="PAN"
capture replace countryname_g = "Papal States" if countrycode_g=="PAP"
capture replace countryname_g = "Papua New Guinea" if countrycode_g=="PNG"
capture replace countryname_g = "Paraguay" if countrycode_g=="PAR"
capture replace countryname_g = "Parma" if countrycode_g=="PMA"
capture replace countryname_g = "Peru" if countrycode_g=="PER"
capture replace countryname_g = "Philippines" if countrycode_g=="PHI"
capture replace countryname_g = "Poland" if countrycode_g=="POL"
capture replace countryname_g = "Portugal" if countrycode_g=="POR"
capture replace countryname_g = "Qatar" if countrycode_g=="QAT"
capture replace countryname_g = "Rumania" if countrycode_g=="RUM"
capture replace countryname_g = "Russia (Soviet Union)" if countrycode_g=="RUS"
capture replace countryname_g = "Rwanda" if countrycode_g=="RWA"
capture replace countryname_g = "Saudi Arabia" if countrycode_g=="SAU"
capture replace countryname_g = "Saxony" if countrycode_g=="SAX"
capture replace countryname_g = "Senegal" if countrycode_g=="SEN"
capture replace countryname_g = "Serbia" if countrycode_g=="SER"
capture replace countryname_g = "Sierra Leone" if countrycode_g=="SIE"
capture replace countryname_g = "Singapore" if countrycode_g=="SIN"
capture replace countryname_g = "Slovakia" if countrycode_g=="SLO"
capture replace countryname_g = "Slovenia" if countrycode_g=="SLV"
capture replace countryname_g = "Solomon Islands" if countrycode_g=="SOL"
capture replace countryname_g = "Somalia" if countrycode_g=="SOM"
capture replace countryname_g = "South Africa" if countrycode_g=="SAF"
capture replace countryname_g = "Spain" if countrycode_g=="SPN"
capture replace countryname_g = "Sri Lanka (Ceylon)" if countrycode_g=="SRI"
capture replace countryname_g = "Sudan" if countrycode_g=="SUD"
capture replace countryname_g = "Surinam" if countrycode_g=="SUR"
capture replace countryname_g = "Swaziland" if countrycode_g=="SWA"
capture replace countryname_g = "Sweden" if countrycode_g=="SWD"
capture replace countryname_g = "Switzerland" if countrycode_g=="SWZ"
capture replace countryname_g = "Syria" if countrycode_g=="SYR"
capture replace countryname_g = "Taiwan" if countrycode_g=="TAW"
capture replace countryname_g = "Tajikistan" if countrycode_g=="TAJ"
capture replace countryname_g = "Tanzania/Tanganyika" if countrycode_g=="TAZ"
capture replace countryname_g = "Thailand" if countrycode_g=="THI"
capture replace countryname_g = "Tibet" if countrycode_g=="TBT"
capture replace countryname_g = "Togo" if countrycode_g=="TOG"
capture replace countryname_g = "Transvaal" if countrycode_g=="TRA"
capture replace countryname_g = "Trinidad and Tobago" if countrycode_g=="TRI"
capture replace countryname_g = "Tunisia" if countrycode_g=="TUN"
capture replace countryname_g = "Tunisia" if countrycode_g=="TUN"
capture replace countryname_g = "Turkey/Ottoman Empire" if countrycode_g=="TUR"
capture replace countryname_g = "Turkmenistan" if countrycode_g=="TKM"
capture replace countryname_g = "Tuscany" if countrycode_g=="TUS"
capture replace countryname_g = "Two Sicilies" if countrycode_g=="SIC"
capture replace countryname_g = "Uganda" if countrycode_g=="UGA"
capture replace countryname_g = "Ukraine" if countrycode_g=="UKR"
capture replace countryname_g = "United Arab Emirates" if countrycode_g=="UAE"
capture replace countryname_g = "United Kingdom" if countrycode_g=="UKG"
capture replace countryname_g = "United Provinces of Central America" if countrycode_g=="UPC"
capture replace countryname_g = "United States of America" if countrycode_g=="USA"
capture replace countryname_g = "Uruguay" if countrycode_g=="URU"
capture replace countryname_g = "Uzbekistan" if countrycode_g=="UZB"
capture replace countryname_g = "Venezuela" if countrycode_g=="VEN"
capture replace countryname_g = "Vietnam (Annam/Cochin China/Tonkin)" if countrycode_g=="VNM"
capture replace countryname_g = "Vietnam, Democratic Republic of" if countrycode_g=="DRV"
capture replace countryname_g = "Vietnam, Republic of" if countrycode_g=="RVN"
capture replace countryname_g = "W�rttemberg" if countrycode_g=="WRT"
capture replace countryname_g = "Yemen (Arab Republic of Yemen)" if countrycode_g=="YEM"
capture replace countryname_g = "Yemen, People's Republic of" if countrycode_g=="YPR"
capture replace countryname_g = "Yugoslavia (Serbia)" if countrycode_g=="YUG"
capture replace countryname_g = "Zambia" if countrycode_g=="ZAM"
capture replace countryname_g = "Zanzibar" if countrycode_g=="ZAN"
capture replace countryname_g = "Zimbabwe (Rhodesia)" if countrycode_g=="ZIM"

* micro-states included by Gleditsch
capture replace countryname_g = "Andorra" if countrycode_g=="AND"
capture replace countryname_g = "Antigua & Barbuda" if countrycode_g=="AAB"
capture replace countryname_g = "Dominica" if countrycode_g=="DMA"
capture replace countryname_g = "Federated States of Micronesia" if countrycode_g=="FSM"
capture replace countryname_g = "Grenada" if countrycode_g=="GRN"
capture replace countryname_g = "Kiribati" if countrycode_g=="KBI"
capture replace countryname_g = "Liechtenstein" if countrycode_g=="LIE"
capture replace countryname_g = "Marshall Islands" if countrycode_g=="MSI"
capture replace countryname_g = "Monaco" if countrycode_g=="MNC"
capture replace countryname_g = "Nauru" if countrycode_g=="NAU"
capture replace countryname_g = "Palau" if countrycode_g=="PAL"
capture replace countryname_g = "Saint Kitts and Nevis" if countrycode_g=="SKN"
capture replace countryname_g = "Saint Lucia" if countrycode_g=="SLU"
capture replace countryname_g = "Saint Vincent and the Grenadines" if countrycode_g=="SVG"
capture replace countryname_g = "Samoa/Western Samoa" if countrycode_g=="WSM"
capture replace countryname_g = "San Marino" if countrycode_g=="SNM"
capture replace countryname_g = "Sao Tome and Principe" if countrycode_g=="STP"
****This is a departure from Gleditsch where the name is S�o Tom� and Principe****

capture replace countryname_g = "Seychelles" if countrycode_g=="SEY"
capture replace countryname_g = "Tonga" if countrycode_g=="TON"
capture replace countryname_g = "Tuvalu" if countrycode_g=="TUV"
capture replace countryname_g = "Vanuatu" if countrycode_g=="VAN"
